##Generic
execute as @e[tag=hub.menuEntity] unless entity @p[tag=inconfig] run kill @s

#Select Anim
execute as @e[tag=hub.menuEntity,tag=!noSelectAnim,type=item_display] at @s run function vs:system/hub/menu/select/anim/anim

#InteractionBox
execute as @e[tag=hub.menuEntity.interactionBox,type=interaction] if data entity @s interaction at @s run function vs:system/hub/menu/interaction_box/interaction

#lever
execute as @e[tag=hub.menuEntity,type=marker,nbt={data:{menu:"generic"}}] if block 10 -35 9 lever[powered=true] run setblock 10 -35 9 lever[powered=false,face=floor,facing=east]
execute as @e[tag=hub.menuEntity,type=marker,nbt={data:{menu:"generic"}}] if block 9 -35 10 lever[powered=true] run setblock 9 -35 10 lever[powered=false,face=floor,facing=south]

##Gamerules
execute as @e[tag=hub.menuEntity,type=marker,nbt={data:{menu:"gamerules"}}] if block 10 -35 9 lever[powered=true] at @s run function vs:system/hub/menu/gamerule_settings/operation/operation with entity @n[type=item_display,tag=hub.gameruleSettings.selectGamerule,distance=..10] item.components."minecraft:custom_data".hubMenu
execute as @e[tag=hub.menuEntity,type=marker,nbt={data:{menu:"gamerules"}}] if block 9 -35 10 lever[powered=true] at @s run function vs:system/hub/menu/gamerule_settings/operation/operation with entity @n[type=item_display,tag=hub.gameruleSettings.selectGamerule,distance=..10] item.components."minecraft:custom_data".hubMenu